package basic;

/**
 * Created by luzl on 4/8/2017.
 */
public class StringCompare {
    public static void main(String[] args){
        String s1="HelloWorld!";
        String s2=new String("HelloWorld!");
        String s3="Hello"+"World!";

        System.out.println(s1==s2);
        System.out.println(s1==s3);
        System.out.println(s1==s2.intern());
        System.out.println(s2.intern());
    }
}
